home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk6
/
arexx
/
sizeblk
/
sizeblk.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-18
|
645b
|
27 lines
/* Sizeblk.rexx Shows recursive function. -Dave Haynie */
parse arg dir .
blocks = countblock(dir)
say 'Total of' blocks 'blocks in directory' '9b'x'3m'dir'9b'x'0m'
exit
countblock : procedure
arg dir
blocks = 0
files = showdir(dir,'file')
dirs = showdir(dir,'dir')
call pragma 'Directory',dir
do while files ~= ''
parse var files oner .
files = delword(files,1,1)
blocks = blocks + subword(statef(oner),3,1) + 1
end
do while dirs ~= ''
parse var dirs oner .
dirs = delword(dirs,1,1)
blocks = blocks + countblock(oner) + 1
end
call pragma 'Directory','/'
return blocks